abstract class Animal {
    // 名字
    private String name;
    // 种类
    private String type;
    // 品种
    private String varieties;
    // 价格
    private String price;

    public Animal() {

    }


    public Animal(String name, String type, String varieties, String price) {
        this.name = name;
        this.type = type;
        this.varieties = varieties;
        this.price = price;
    }

    // 吃饭
    abstract void eat();

    // 睡觉
    abstract void sleep();

    // 玩
    abstract void play();

    // 叫
    abstract void call();

    abstract void getAll();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getVarieties() {
        return varieties;
    }

    public void setVarieties(String varieties) {
        this.varieties = varieties;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
}

// 狗
class Dog extends Animal {

    public Dog() {
        super();
    }

    public Dog(String name, String type, String varieties, String price) {
        super(name, type, varieties, price);

    }

    @Override
    void eat() {
        System.out.printf("%s在吃饭\n", getName());
    }

    @Override
    void sleep() {
        System.out.printf("%s在睡觉\n", getName());
    }

    @Override
    void play() {
        System.out.printf("%s在玩\n", getName());
    }

    @Override
    void call() {
        System.out.printf("%s在叫\n", getName());
    }

    void getAll() {
        eat();
        sleep();
        play();
        call();
    }
}

// 猫
class Cat extends Animal {

    public Cat() {

    }

    public Cat(String name, String type, String varieties, String price) {
        super(name, type, varieties, price);
    }

    @Override
    void eat() {
        System.out.printf("%s在吃饭\n", getName());
    }

    @Override
    void sleep() {
        System.out.printf("%s在睡觉\n", getName());
    }

    @Override
    void play() {
        System.out.printf("%s在玩\n", getName());
        call();
    }

    @Override
    void call() {
        System.out.printf("%s在叫\n", getName());
    }

    void getAll() {
        eat();
        sleep();
        play();
    }
}

public class 实验四面向对象基础编程 {
    public static void main(String[] args) {
        Animal dog1 = new Dog("藏獒", "狮头", "虎头", "100");
        Animal dog2 = new Dog("中华田园犬", "巴哥犬", "大黄狗", "100000000000000");

        dog1.getAll();
        System.out.println("...........................");
        dog2.getAll();
        System.out.println("...........................");

        Animal cat1 = new Cat("加菲猫", "橘猫", "胡子", "10");
        Animal cat2 = new Cat("波斯猫", "金渐层", "银渐层", "1000-5000");

        cat1.getAll();
        System.out.println("...........................");
        cat2.getAll();
    }
}
